package com.sunny.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.sunny.model.Bank;
import com.sunny.querybean.BankQuery;
import com.sunny.service.IBankService;

import framework.base.BaseController;

@Controller
@RequestMapping("/bank")
public class BankController extends BaseController {
	
	@Resource 
	IBankService bankService;
 
	@RequestMapping("update")
	public ModelAndView update(HttpServletRequest request, HttpServletResponse response){
		ModelAndView mView = new ModelAndView("/userList");
		BankQuery bq = parseForm(BankQuery.class, request);
		Bank find = bankService.selectOne(bq);
		mView.addObject("bank", find);
		return mView;
	}
}
